package com.lzj.demo.design.abstractfactory.workshop;

import com.lzj.demo.design.abstractfactory.IIR;

import java.util.concurrent.TimeUnit;

public class IIRCacheAdapter implements ICacheAdapter{

    private IIR iir = new IIR();

    @Override
    public String get(String key) {
        return iir.get(key);
    }

    @Override
    public void set(String key, String value) {
        iir.set(key,value);
    }

    @Override
    public void set(String key, String value, long timeout, TimeUnit timeUnit) {
        iir.setEx(key,value,timeout,timeUnit);
    }

    @Override
    public void del(String key) {
        iir.delete(key);
    }
}
